import 'package:flutter/material.dart';
import 'package:word_range_client/pages/general/RegisterView.dart';

class LogonButton extends StatefulWidget {
  const LogonButton({super.key});

  @override
  State<LogonButton> createState() => _LogonButtonState();
}

class _LogonButtonState extends State<LogonButton> {

  void _toRegisterPage(){
    Navigator.of(context).push(MaterialPageRoute(builder: (context) => const RegisterView()));
  }

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      height: MediaQuery.of(context).size.height * 0.068,
      width: MediaQuery.of(context).size.width * 0.6,
      child: ElevatedButton(
        onPressed: _toRegisterPage,
        style: ButtonStyle(
            shape: MaterialStateProperty.all(
                RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(18)
                )
            )
        ),
        child:  const Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text("注册账号",style: TextStyle(fontSize: 23),),
          ],
        ),
      ),
    );
  }
}
